package demo1;

import java.util.Comparator;

public class AgeComparator implements Comparator<Stu> {
    public int compare( Stu stu3,Stu stu4){
        return stu3.age- stu4.age;//基本类型不可以用compareTo;
    }
}
